package com.kantboot.functional.file.web.admin.controller;

import com.kantboot.functional.file.domain.dto.FunctionalFileSearchDTO;
import com.kantboot.functional.file.domain.entity.FunctionalFile;
import com.kantboot.functional.file.service.IFunctionalFileService;
import com.kantboot.util.common.result.RestResult;
import com.kantboot.util.core.controller.BaseAdminController;
import com.kantboot.util.core.param.PageParam;
import com.kantboot.util.core.result.PageResult;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/functional-file-web/admin/functionalFile")
public class FunctionalFileControllerOfAdmin
        extends BaseAdminController<FunctionalFile,Long> {

    @Resource
    private IFunctionalFileService service;

    @RequestMapping("/getBodyData")
    public RestResult<PageResult> getBodyData(@RequestBody PageParam<FunctionalFileSearchDTO> pageParam) {
        return RestResult.success(service.getBodyData(pageParam), "getSuccess","获取成功");
    }
}
